#! /bin/bash
if [[ `whoami` != "root" ]] ; then
	echo "This Script must be run as ROOT."
	exit
fi
PWD="$( cd "$( dirname "$0" )" && pwd )"
LOOPDEV=`ls $PWD/loop*`
umount $PWD/rootDir/
losetup -d /dev/`basename $LOOPDEV`
rm $LOOPDEV
echo "Partition umounted"
